<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="~{OP/_fragments ::head(~{::title})}">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>博客管理</title>
    <!--    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">-->
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css">
    <link rel="stylesheet" href="../../static/css/index.css">
    <link rel="stylesheet" href="../../static/Semantic-UI/semantic.css">
    <link rel="stylesheet" href="../../static/Semantic-UI/semantic.css">
</head>
<body>

<!--导航-->
<nav th:replace="~{OP/_fragments ::menu(0)}" class="ui  inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui red header item">后台管理</h2>
            <a href="#" class="m-item item m-mobile-hide"><i class="small home icon"></i>博客</a>
            <a href="#" class="m-item item m-mobile-hide" ><i class="small idea icon"></i>分类</a>
            <a href="#" class=" m-item item m-mobile-hide"><i class="small tags icon"></i>标签</a>
            <div class="right m-item item m-mobile-hide menu">
                <div class=" ui  dropdown item">
                    <div class="text"><img src="../../static/images/shana1.jpg" class="ui avatar image">
                        贽殿遮那
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="" class="item">注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<div class="ui attached pointing menu">

    <div class="ui container">
        <div class="right menu">
            <a href="" class="red active item">发表</a>
            <a href="" class=" item ">列表</a>
        </div>
    </div>
</div>


<div class="m-container-small m-padded-tb-big">
    <div class="ui container">
        <form action="#" method="post" class="ui form  ">


            <div class="required field">
                <div class="ui left labeled input">
                    <div class="ui red basic selection compact dropdown label">
                        <input type="hidden" value="原创">
                        <i class="dropdown icon"></i>
                        <div class="text">原创</div>
                        <div class="menu">
                            <div class="item" data-value="原创">原创</div>
                            <div class="item" data-value="转载">转载</div>
                        </div>
                    </div>
                    <input type="text" name="title" placeholder="标题">
                </div>
            </div>

            <div class="field">
                <div id="md-content" style="z-index: 1!important; ">
                    <textarea placeholder="正文" name="" id="content" cols="30" rows="10" style="display: none">正文</textarea>
                </div>
            </div>

            <div class="two fields">
                <div class="field">
                    <div class="ui left labeled action input">
                        <div class="label ui compact red basic label">分类</div>
                        
                        <div class="ui fluid selection dropdown">
                            <input type="hidden" name="type">
                            <i class="dropdown icon"></i>
                            <div class="default text">分类</div>
                            <div class="menu">
                                <div class="item" data-value="1">公告</div>
                                <div class="item" data-value="2">开发者手册</div>
                                <div class="item" data-value="3">游戏</div>
                                <div class="item" data-value="4">方法论</div>
                                <div class="item" data-value="5">资讯</div>
                                <div class="item" data-value="6">生活杂谈</div>
                                <div class="item" data-value="6">音乐</div>
                                <div class="item" data-value="6">ACG</div>
                                <div class="item" data-value="6">科技</div>
                                <div class="item" data-value="6">思考与感悟</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="field">
                    <div class="ui left labeled action input">
                        <div class="label ui compact red basic label">标签</div>

                        <div class="ui fluid multiple search selection dropdown">
                            <input type="hidden" name="tag">
                            <i class="dropdown icon"></i>
                            <div class="default text">标签</div>
                            <div class="menu">
                                <div class="item" data-value="1">java</div>
                                <div class="item" data-value="2">html</div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="field">
                <div class="ui left labeled input">
                    <label class="ui red basic label">首图</label>

                    <input type="text" name="indexPicture" placeholder="首图引用地址">
                </div>
            </div>

            <div class="inline fields">
                <div class="field">
                    <div class="ui checkbox">
                        <input type="checkbox" id="recommend" name="recommend" class="hidden">
                        <label for="recommend"> 推荐</label>
                    </div>
                </div>
                <div class="field">
                    <div class="ui checkbox">
                        <input type="checkbox" id="shareinfo" name="info" class="hidden">
                        <label for="shareinfo"> 转载声明模块</label>
                    </div>
                </div>
                <div class="field">
                    <div class="ui checkbox">
                        <input type="checkbox" id="appreciation" name="appreciation" class="hidden">
                        <label for="appreciation">赞赏模块</label>
                    </div>
                </div>
                <div class="field">
                    <div class="ui checkbox">
                        <input type="checkbox" id="comment" name="comment" class="hidden">
                        <label for="comment">留言模块</label>
                    </div>
                </div>
            </div>

            <div class="ui error message"></div>

            <div class="ui right aligned container">
                <button type="button" class="ui basic  button" onclick="window.history.go(-1)">返回</button>
                <button class="ui secondary basic  button">保存</button>
                <button class="ui red basic button">发布</button>
            </div>

        </form>
    </div>
</div>






<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script src="../../static/lib/editormd/editormd.min.js"></script>

<script>
    $('.menu.toggle').click(function (){
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown')
        .dropdown();

    $('.ui.form').form({
        fields : {
            title :{
                identifier: 'title',
                rules:[{
                    type : 'empty',
                    prompt: '标题:请输入博客标题'
                }]
            }
        }
    });


    //初始化markdown
    var contentEditor;
    $(function() {
        contentEditor = editormd("md-content", {
            width   : "100%",
            height  : 640,
            syncScrolling : "single",
            path    : "../static/lib/editormd/lib/"
        });
    });


</script>

</body>
</html>